﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" EnableTheming="true" CodeFile="OrderSpec.aspx.cs" Inherits="Default2" %>

<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxFormLayout" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Xpo.v12.2.Web, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Xpo" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridLookup" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="Content/Site.css" />
    <script type="text/javascript">
        function OnNewClick(s, e) {
            grd2.AddNewRow();
        }

        function OnEditClick(s, e) {
            var index = grd2.GetFocusedRowIndex();
            grd2.StartEditRow(index);
        }

        function OnSaveClick(s, e) {
            grd2.UpdateEdit();
        }

        function OnCancelClick(s, e) {
            grd2.CancelEdit();
        }

        function OnDeleteClick(s, e) {
            var index = grd2.GetFocusedRowIndex();
            if (confirm('Вы действительно хотите удалить запись ?')) {

                grd2.DeleteRow(grd2.GetFocusedRowIndex());
            }
        }
    </script>
</head>
<body runat="server" id="Body">

    <form id="frm" runat="server">

        <p style="margin-left: 20px; text-align: center;">
            <dx:ASPxLabel ID="lbl_OrderInfo" runat="server" Text="" Font-Size="12pt"></dx:ASPxLabel>
        </p>

        <dx:ASPxFormLayout ID="root_groop" runat="server" Theme="DevEx">
            <Items>
                <dx:TabbedLayoutGroup Caption="Tabbed Group" TabPosition="Bottom" Height="100%" Width="100%">
                    <Items>
                        <dx:LayoutGroup Caption="список работ">
                            <Items>
                                <dx:LayoutItem Caption="список работ" ShowCaption="False">
                                    <LayoutItemNestedControlCollection>
                                        <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                            <dx:ASPxGridView ID="grd2" runat="server" ClientInstanceName="grd2" AutoGenerateColumns="False" KeyFieldName="CODE" OnCellEditorInitialize="grd2_CellEditorInitialize" OnInitNewRow="grd2_InitNewRow" KeyboardSupport="True">
                                                <ClientSideEvents RowDblClick="function(s, e) { s.StartEditRow(e.visibleIndex); }" FocusedRowChanged="function(s, e) {
	grdMAT.PerformCallback(s.GetFocusedRowIndex());
}" />
                                                <Columns>
                                                    <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0" ButtonType="Image" Width="80px">
                                                        <EditButton Visible="True">
                                                            <Image ToolTip="Редактировать" Url="~/Content/Images/edit.png">
                                                            </Image>
                                                        </EditButton>
                                                        <NewButton Visible="True">
                                                            <Image Url="~/Content/Images/edit1.png">
                                                            </Image>
                                                        </NewButton>
                                                        <DeleteButton Visible="True">
                                                            <Image Url="~/Content/Images/delete.png">
                                                            </Image>
                                                        </DeleteButton>
                                                        <CancelButton>
                                                            <Image Url="~/Content/Images/close.png">
                                                            </Image>
                                                        </CancelButton>
                                                        <UpdateButton>
                                                            <Image Url="~/Content/Images/save.png">
                                                            </Image>
                                                        </UpdateButton>
                                                    </dx:GridViewCommandColumn>
                                                    <dx:GridViewDataTextColumn Caption="Код" FieldName="CODE" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="1" Width="80px">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataDateColumn FieldName="DATA" VisibleIndex="2" Caption="Дата" Width="90px">
                                                        <PropertiesDateEdit>
                                                            <ValidationSettings Display="Dynamic">
                                                                <RequiredField IsRequired="True" />
                                                            </ValidationSettings>
                                                        </PropertiesDateEdit>
                                                        <Settings AllowHeaderFilter="False" />
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataComboBoxColumn FieldName="KONTRAGENT" ShowInCustomizationForm="True" Visible="False" VisibleIndex="3">
                                                        <PropertiesComboBox DataSourceID="ds_kontr" TextField="NAME" ValueField="CODE">
                                                        </PropertiesComboBox>
                                                        <EditFormSettings Visible="false" />
                                                    </dx:GridViewDataComboBoxColumn>
                                                    <dx:GridViewDataComboBoxColumn Caption="Работа по наряду" FieldName="SERVISWORK" ShowInCustomizationForm="True" VisibleIndex="4" Width="220px">
                                                        <PropertiesComboBox DataSourceID="ds_serviswork"
                                                            EnableCallbackMode="true" CallbackPageSize="20"
                                                            IncrementalFilteringMode="Contains" FilterMinLength="3"
                                                            TextField="NAME" ValueField="CODE" ValueType="System.Int32">
                                                            <DropDownButton Visible="False">
                                                            </DropDownButton>
                                                        </PropertiesComboBox>
                                                        <%--                                                    <EditItemTemplate>
                                                        <dx:ASPxGridLookup ID="ASPxGridLookup1" runat="server" AutoGenerateColumns="False" DataSourceID="ds_serviswork" 
                                                            KeyFieldName="CODE" TextFormatString="{1}" Width="360px" AutoResizeWithContainer="true">
                                                        <GridViewProperties>
                                                        <Settings ShowFilterRow="true" ShowFilterBar="Auto" ShowFilterRowMenuLikeItem="true" />    
                                                        <SettingsBehavior AllowFocusedRow="True" AllowGroup="true" AllowSort="true" AllowSelectSingleRowOnly="True" AllowSelectByRowClick="True" ColumnResizeMode="Control"></SettingsBehavior>
                                                        </GridViewProperties>
                                                                <Columns>
                                                                    <dx:GridViewDataTextColumn FieldName="CODE" ReadOnly="True" VisibleIndex="0" Width="60px">
                                                                    </dx:GridViewDataTextColumn>
                                                                    <dx:GridViewDataTextColumn FieldName="NAME" VisibleIndex="3">
                                                                        <Settings FilterMode="DisplayText"></Settings>
                                                                    </dx:GridViewDataTextColumn>
                                                                </Columns>
                                                            </dx:ASPxGridLookup>
                                                    </EditItemTemplate>--%>
                                                        <Settings FilterMode="DisplayText" />
                                                        <EditFormSettings Visible="True" />
                                                    </dx:GridViewDataComboBoxColumn>
                                                    <dx:GridViewDataTextColumn FieldName="HOUSE" ShowInCustomizationForm="True" Visible="False" VisibleIndex="5">
                                                        <EditFormSettings Visible="false" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ADDR" ShowInCustomizationForm="True" Visible="False" VisibleIndex="6">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Стоимость" FieldName="PRICE" ShowInCustomizationForm="True" VisibleIndex="7" Width="80px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Описание работ (место)" FieldName="NOTE" ShowInCustomizationForm="True" VisibleIndex="8" Width="250px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="WORKLIST" ShowInCustomizationForm="True" VisibleIndex="9" Visible="False">
                                                        <EditFormSettings Visible="false" />
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="Кол-во" FieldName="QUANTITY" ShowInCustomizationForm="True" VisibleIndex="11" Width="60px">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataHyperLinkColumn Caption="Журнал" FieldName="JWORK" ShowInCustomizationForm="True" VisibleIndex="12" Width="60px">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataHyperLinkColumn>
                                                    <dx:GridViewDataDateColumn Caption="Дата создания" FieldName="FDATA" ShowInCustomizationForm="True" VisibleIndex="13" Width="100px">
                                                        <EditFormSettings Visible="False" />
                                                    </dx:GridViewDataDateColumn>
                                                    <dx:GridViewDataTextColumn FieldName="JWORK1" ShowInCustomizationForm="True" Visible="False" VisibleIndex="14">
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" ColumnResizeMode="Control" EnableCustomizationWindow="True" ConfirmDelete="true" />
                                                <SettingsPager>
                                                    <PageSizeItemSettings Visible="True">
                                                    </PageSizeItemSettings>
                                                </SettingsPager>
                                                <Settings ShowFilterBar="Auto" ShowHeaderFilterButton="false" />
                                                <%--<SettingsCookies Enabled="false" CookiesID="Ordergrd_orderspec" StoreControlWidth="True" />--%>
                                            </dx:ASPxGridView>
                                        </dx:LayoutItemNestedControlContainer>
                                    </LayoutItemNestedControlCollection>
                                </dx:LayoutItem>
                            </Items>
                        </dx:LayoutGroup>
                        <dx:LayoutGroup Caption="работа по адресам">
                            <Items>
                                <dx:LayoutItem Caption="работа по адресам" ShowCaption="False">
                                    <LayoutItemNestedControlCollection>
                                        <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                            <dx:ASPxGridView ID="grd5" runat="server" Width="100%" KeyboardSupport="True" AutoGenerateColumns="False">
                                                <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" ColumnResizeMode="Control" EnableCustomizationWindow="True" />
                                                <SettingsPager PageSize="30">
                                                    <PageSizeItemSettings Visible="True">
                                                    </PageSizeItemSettings>
                                                </SettingsPager>
                                                <SettingsEditing EditFormColumnCount="1" />
                                                <Settings ShowFilterBar="Auto" ShowFilterRow="True" ShowHeaderFilterButton="false" />
                                            </dx:ASPxGridView>
                                        </dx:LayoutItemNestedControlContainer>
                                    </LayoutItemNestedControlCollection>
                                </dx:LayoutItem>
                            </Items>
                        </dx:LayoutGroup>
                    </Items>
                </dx:TabbedLayoutGroup>
                <dx:LayoutGroup Caption="Материалы">
                    <Items>
                        <dx:LayoutItem Caption="Layout Item" ShowCaption="False">
                            <LayoutItemNestedControlCollection>
                                <dx:LayoutItemNestedControlContainer runat="server" SupportsDisabledAttribute="True">
                                    <dx:ASPxGridView ID="grdMAT" runat="server" AutoGenerateColumns="False" KeyFieldName="CODE" ClientInstanceName="grdMAT" OnCustomCallback="grdMAT_CustomCallback" DataSourceID="ds_WORKSPECMATERIAL">
                                        <Columns>
                                            <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
                                                <EditButton Visible="True">
                                                </EditButton>
                                                <NewButton Visible="True">
                                                </NewButton>
                                                <DeleteButton Visible="True">
                                                </DeleteButton>
                                            </dx:GridViewCommandColumn>
                                            <dx:GridViewDataTextColumn FieldName="CODE" ReadOnly="True" ShowInCustomizationForm="True" VisibleIndex="1" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="WORKSPECLIST" ShowInCustomizationForm="True" VisibleIndex="2" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataDateColumn FieldName="DATA" ShowInCustomizationForm="True" VisibleIndex="3" Visible="False">
                                            </dx:GridViewDataDateColumn>
                                            <dx:GridViewDataTextColumn FieldName="KONTRAGENT" ShowInCustomizationForm="True" VisibleIndex="4" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="SERVISWORK" ShowInCustomizationForm="True" VisibleIndex="5" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="HOUSE" ShowInCustomizationForm="True" VisibleIndex="6" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="SERVISMATERIAL" ShowInCustomizationForm="True" VisibleIndex="7" Visible="False">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="QUANTITY" ShowInCustomizationForm="True" VisibleIndex="9" Caption="Кол-во">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="PRICE" ShowInCustomizationForm="True" VisibleIndex="10" Caption="Цена">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="NOTE" ShowInCustomizationForm="True" VisibleIndex="11" Caption="Примечание">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataComboBoxColumn Caption="Материал" FieldName="CLASSMAT" ShowInCustomizationForm="True" VisibleIndex="8">
                                                <PropertiesComboBox DataSourceID="ds_CLASSMAT"
                                                    TextField="FULLNAME" ValueField="CODE" ValueType="System.Int32"
                                                    EnableCallbackMode="true" CallbackPageSize="20"
                                                    IncrementalFilteringMode="Contains" FilterMinLength="3">
                                                </PropertiesComboBox>
                                                <Settings FilterMode="DisplayText" />
                                            </dx:GridViewDataComboBoxColumn>
                                        </Columns>
                                        <SettingsBehavior AllowFocusedRow="True" />
                                        <SettingsLoadingPanel Delay="100" />
                                    </dx:ASPxGridView>
                                </dx:LayoutItemNestedControlContainer>
                            </LayoutItemNestedControlCollection>
                        </dx:LayoutItem>
                    </Items>
                </dx:LayoutGroup>
            </Items>
            <Styles>
                <LayoutGroupBox>
                    <Caption Font-Size="Small">
                    </Caption>
                </LayoutGroupBox>
            </Styles>
        </dx:ASPxFormLayout>
        <asp:SqlDataSource ID="ds_WORKSPECLIST" runat="server" ConflictDetection="CompareAllValues"
            ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>"
            DeleteCommand="DELETE FROM &quot;WORKSPECLIST&quot; WHERE &quot;CODE&quot; = ? "
            InsertCommand="INSERT INTO &quot;WORKSPECLIST&quot; (&quot;CODE&quot;, &quot;DATA&quot;, &quot;KONTRAGENT&quot;, &quot;SERVISWORK&quot;, &quot;HOUSE&quot;, &quot;ADDR&quot;, &quot;PRICE&quot;, &quot;NOTE&quot;, &quot;WORKLIST&quot;, &quot;USERNAME&quot;, &quot;LASTTIME&quot;, &quot;QUANTITY&quot;, &quot;JWORK&quot;, &quot;FDATA&quot;, &quot;JWORK1&quot;) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" OldValuesParameterFormatString="original_{0}" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>"
            SelectCommand="SELECT * FROM &quot;WORKSPECLIST&quot; WHERE (&quot;WORKLIST&quot; = ?)"
            UpdateCommand="UPDATE &quot;WORKSPECLIST&quot; SET &quot;DATA&quot; = ?, &quot;KONTRAGENT&quot; = ?, &quot;SERVISWORK&quot; = ?, &quot;HOUSE&quot; = ?, &quot;ADDR&quot; = ?, &quot;PRICE&quot; = ?, &quot;NOTE&quot; = ?, &quot;WORKLIST&quot; = ?, &quot;USERNAME&quot; = ?, &quot;LASTTIME&quot; = ?, &quot;QUANTITY&quot; = ?, &quot;JWORK&quot; = ?, &quot;FDATA&quot; = ?, &quot;JWORK1&quot; = ? WHERE &quot;CODE&quot; = ? " OnInserting="ds_WORKSPECLIST_Inserting">
            <DeleteParameters>
                <asp:Parameter Name="original_CODE" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="CODE" Type="Int32" />
                <asp:Parameter Name="DATA" Type="DateTime" />
                <asp:Parameter Name="KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="SERVISWORK" Type="Int32" />
                <asp:Parameter Name="HOUSE" Type="Int32" />
                <asp:Parameter Name="ADDR" Type="Int32" />
                <asp:Parameter Name="PRICE" Type="Decimal" />
                <asp:Parameter Name="NOTE" Type="String" />
                <asp:Parameter Name="WORKLIST" Type="Int32" />
                <asp:Parameter Name="USERNAME" Type="String" />
                <asp:Parameter Name="LASTTIME" Type="DateTime" />
                <asp:Parameter Name="QUANTITY" Type="Decimal" />
                <asp:Parameter Name="JWORK" Type="Int32" />
                <asp:Parameter Name="FDATA" Type="DateTime" />
                <asp:Parameter Name="JWORK1" Type="Int32" />
            </InsertParameters>
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="-1" Name="WORKLIST" QueryStringField="CODE" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="DATA" Type="DateTime" />
                <asp:Parameter Name="KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="SERVISWORK" Type="Int32" />
                <asp:Parameter Name="HOUSE" Type="Int32" />
                <asp:Parameter Name="ADDR" Type="Int32" />
                <asp:Parameter Name="PRICE" Type="Decimal" />
                <asp:Parameter Name="NOTE" Type="String" />
                <asp:Parameter Name="WORKLIST" Type="Int32" />
                <asp:Parameter Name="USERNAME" Type="String" />
                <asp:Parameter Name="LASTTIME" Type="DateTime" />
                <asp:Parameter Name="QUANTITY" Type="Decimal" />
                <asp:Parameter Name="JWORK" Type="Int32" />
                <asp:Parameter Name="FDATA" Type="DateTime" />
                <asp:Parameter Name="JWORK1" Type="Int32" />
                <asp:Parameter Name="original_CODE" Type="Int32" />
                <asp:Parameter Name="original_DATA" Type="DateTime" />
                <asp:Parameter Name="original_KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="original_SERVISWORK" Type="Int32" />
                <asp:Parameter Name="original_HOUSE" Type="Int32" />
                <asp:Parameter Name="original_ADDR" Type="Int32" />
                <asp:Parameter Name="original_ADDR" Type="Int32" />
                <asp:Parameter Name="original_PRICE" Type="Decimal" />
                <asp:Parameter Name="original_PRICE" Type="Decimal" />
                <asp:Parameter Name="original_NOTE" Type="String" />
                <asp:Parameter Name="original_NOTE" Type="String" />
                <asp:Parameter Name="original_WORKLIST" Type="Int32" />
                <asp:Parameter Name="original_USERNAME" Type="String" />
                <asp:Parameter Name="original_USERNAME" Type="String" />
                <asp:Parameter Name="original_LASTTIME" Type="DateTime" />
                <asp:Parameter Name="original_LASTTIME" Type="DateTime" />
                <asp:Parameter Name="original_QUANTITY" Type="Decimal" />
                <asp:Parameter Name="original_QUANTITY" Type="Decimal" />
                <asp:Parameter Name="original_JWORK" Type="Int32" />
                <asp:Parameter Name="original_JWORK" Type="Int32" />
                <asp:Parameter Name="original_FDATA" Type="DateTime" />
                <asp:Parameter Name="original_FDATA" Type="DateTime" />
                <asp:Parameter Name="original_JWORK1" Type="Int32" />
                <asp:Parameter Name="original_JWORK1" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="ds_serviswork" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>" SelectCommand="SELECT &quot;CODE&quot;, &quot;NAME&quot; FROM &quot;SERVISWORK&quot;" EnableCaching="True"></asp:SqlDataSource>
        <asp:SqlDataSource ID="ds_kontr" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>" ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>" SelectCommand="SELECT &quot;CODE&quot;, &quot;NAME&quot; FROM &quot;KONTRAGENT&quot; ORDER BY &quot;NAME&quot;"></asp:SqlDataSource>
        <asp:SqlDataSource ID="ds_WORKSPECMATERIAL" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:ConnectionStringDez %>"
            DeleteCommand="DELETE FROM &quot;WORKSPECMATERIAL&quot; WHERE &quot;CODE&quot; = ?" InsertCommand="INSERT INTO &quot;WORKSPECMATERIAL&quot; (&quot;CODE&quot;, &quot;WORKSPECLIST&quot;, &quot;DATA&quot;, &quot;KONTRAGENT&quot;, &quot;SERVISWORK&quot;, &quot;HOUSE&quot;, &quot;SERVISMATERIAL&quot;, &quot;QUANTITY&quot;, &quot;PRICE&quot;, &quot;NOTE&quot;, &quot;CLASSMAT&quot;) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" OldValuesParameterFormatString="original_{0}" 
            ProviderName="<%$ ConnectionStrings:ConnectionStringDez.ProviderName %>"
            SelectCommand="SELECT &quot;CODE&quot;, &quot;WORKSPECLIST&quot;, &quot;DATA&quot;, &quot;KONTRAGENT&quot;, &quot;SERVISWORK&quot;, &quot;HOUSE&quot;, &quot;SERVISMATERIAL&quot;, &quot;QUANTITY&quot;, &quot;PRICE&quot;, &quot;NOTE&quot;, &quot;CLASSMAT&quot; FROM &quot;WORKSPECMATERIAL&quot; WHERE (&quot;WORKSPECLIST&quot; = ?)"
            UpdateCommand="UPDATE &quot;WORKSPECMATERIAL&quot; SET &quot;WORKSPECLIST&quot; = ?, &quot;DATA&quot; = ?, &quot;KONTRAGENT&quot; = ?, &quot;SERVISWORK&quot; = ?, &quot;HOUSE&quot; = ?, &quot;SERVISMATERIAL&quot; = ?, &quot;QUANTITY&quot; = ?, &quot;PRICE&quot; = ?, &quot;NOTE&quot; = ?, &quot;CLASSMAT&quot; = ? WHERE &quot;CODE&quot; = ?" OnInserting="ds_WORKSPECMATERIAL_Inserting">
            <DeleteParameters>
                <asp:Parameter Name="original_CODE" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="CODE" Type="Int32" />
                <asp:Parameter Name="WORKSPECLIST" Type="Int32" />
                <asp:Parameter Name="DATA" Type="DateTime" />
                <asp:Parameter Name="KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="SERVISWORK" Type="Int32" />
                <asp:Parameter Name="HOUSE" Type="Int32" />
                <asp:Parameter Name="SERVISMATERIAL" Type="Int32" />
                <asp:Parameter Name="QUANTITY" Type="Decimal" />
                <asp:Parameter Name="PRICE" Type="Decimal" />
                <asp:Parameter Name="NOTE" Type="String" />
                <asp:Parameter Name="CLASSMAT" Type="Int32" />
            </InsertParameters>
            <SelectParameters>
                <asp:SessionParameter DefaultValue="-1" Name="WORKSPECLIST" SessionField="WorkID" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="WORKSPECLIST" Type="Int32" />
                <asp:Parameter Name="DATA" Type="DateTime" />
                <asp:Parameter Name="KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="SERVISWORK" Type="Int32" />
                <asp:Parameter Name="HOUSE" Type="Int32" />
                <asp:Parameter Name="SERVISMATERIAL" Type="Int32" />
                <asp:Parameter Name="QUANTITY" Type="Decimal" />
                <asp:Parameter Name="PRICE" Type="Decimal" />
                <asp:Parameter Name="NOTE" Type="String" />
                <asp:Parameter Name="CLASSMAT" Type="Int32" />
                <asp:Parameter Name="original_CODE" Type="Int32" />
                <asp:Parameter Name="original_WORKSPECLIST" Type="Int32" />
                <asp:Parameter Name="original_DATA" Type="DateTime" />
                <asp:Parameter Name="original_KONTRAGENT" Type="Int32" />
                <asp:Parameter Name="original_SERVISWORK" Type="Int32" />
                <asp:Parameter Name="original_HOUSE" Type="Int32" />
                <asp:Parameter Name="original_SERVISMATERIAL" Type="Int32" />
                <asp:Parameter Name="original_SERVISMATERIAL" Type="Int32" />
                <asp:Parameter Name="original_QUANTITY" Type="Decimal" />
                <asp:Parameter Name="original_PRICE" Type="Decimal" />
                <asp:Parameter Name="original_NOTE" Type="String" />
                <asp:Parameter Name="original_NOTE" Type="String" />
                <asp:Parameter Name="original_CLASSMAT" Type="Int32" />
                <asp:Parameter Name="original_CLASSMAT" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <asp:EntityDataSource ID="ds_CLASSMAT" runat="server" ConnectionString="name=DEZ" DefaultContainerName="DEZ" EnableFlattening="False" EntitySetName="CLASSMAT" Select="it.[CODE], it.[FULLNAME]" OnInserting="ds_CLASSMAT_Inserting">
        </asp:EntityDataSource>
    </form>
</body>
</html>
